﻿@{
    ViewBag.Title = "CapitalList";
    Layout = null;
}

<link rel="stylesheet" type="text/css" href="~/Easy-UI/easyui/1.3.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/wu.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/icon.css" />
<script type="text/javascript" src="~/Easy-UI/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>

<style>
    th {
        text-align: right;
    }
</style>

<script>
    $(function () {
        $('#btn').bind('click', function () {
            alert('easyui');
        });
    });
</script>
<!-- 弹出层 -->
<div id="dd" class="easyui-dialog" title="My Dialog" style="width:auto;height:550px;"
     data-options="iconCls:'icon-save',resizable:true,modal:true">
    <form id="ff" action="/House/loanAdd">
        <table id="tttt">
            <tr>
                <td>借款人姓名：</td>
                <td><input type="text" /></td>
                <td>身份证号：</td>
                <td><input type="text" /></td>
                <td>联系电话：</td>
                <td><input type="text" /></td>
                <td><a href="javascript:void(0)" onclick="aaa()" class="easyui-linkbutton" iconcls="icon-add">添加联系人</a></td>
            </tr>
        </table>
    </form>
    <script>
        function aaa() {
            $("#tttt").append("<tr><td>借款人姓名：</td><td><input type=\"text\" /></td><td>身份证号：</td><td><input type=\"text\" /></td><td>联系电话：</td><td><input type=\"text\" /></td><td><a href=\"#\" class=\"easyui-linkbutton\" iconcls=\"icon-no\" onclick=\"bbb(this)\">删除联系人</a></td></tr>");
        }
        function bbb(obj) {
            $(obj).parent().parent().remove();
        }
        $('#p').panel({
            width: 500,
            height: 150,
            title: 'My Panel',
            tools: [{
                iconCls: 'icon-add',
                handler: function () { alert('new') }
            }, {
                iconCls: 'icon-save',
                handler: function () { alert('save') }
            }]
        });
        $('#p').panel('move', {
            left: 100,
            top: 100
        });
        $('#p').panel({
            href: 'content_url.php',
            onLoad: function () {
                alert('loaded successfully');
            }
        });
    </script>
    <h2>借款人员基本信息：</h2>
    <table style="text-align:right;">
        <tr>
            <th style="font-size:14px;">借款人员姓名：</th>
            <td><input class="easyui-textbox" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>身份证号：</th>
            <td><input class="easyui-textbox" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>联系电话：</th>
            <td><input class="easyui-textbox" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>联系人：</th>
            <td><input class="easyui-textbox" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>联系人电话：</th>
            <td><input class="easyui-textbox" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>房屋剩余年限：</th>
            <td><input class="easyui-textbox" name="surplus_Years" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>贷款额度（万元）：</th>
            <td><input class="easyui-textbox" name="basic_Quota" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>房屋坐落：</th>
            <td><input class="easyui-textbox" name="house_Located" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"> </td>
        </tr>
        <tr>
            <th>房屋用途：</th>
            <td>
                <select class="easyui-combobox" name="house_Purpose" style="width:300px;">
                    <option value="1">住宅</option>
                    <option value="2">非宅</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>建成年代：</th>
            <td><input class="easyui-textbox" name="house_Time" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>建成年代来源：</th>
            <td>
                <select class="easyui-combobox" name="yers_Source" style="width:300px;">
                    <option value="1">不动产权登记证</option>
                    <option value="2">现场询问</option>
                    <option value="3">楼牌</option>
                    <option value="3">已购共有住房上市确认书</option>
                    <option value="3">其他</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>报告类型：</th>
            <td>
                <select class="easyui-combobox" name="presentation_Type" style="width:300px;">
                    <option value="1">公积金贷款二手房抵押质押方式正式报告(适用模式1纯抵押无担保情况下)</option>
                    <option value="2">公积金贷款二手房担保式正式报告(适用模式2未获得新证12家中介)</option>
                    <option value="3">公积金贷款二手房担保正式报告(适用模式3模式2有担保已取得新证情况下)</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>评估受理：</th>
            <td style="text-align:left">
                <input type="checkbox" name="assessment" value="身份证明" />身份证明
                <input type="checkbox" name="assessment" value="房屋权属" />房屋权属
                <input type="checkbox" name="assessment" value="网签合同" />网签合同
            </td>
        </tr>
        <tr>
            <th>所属部门：</th>
            <td>
                <select class="easyui-combobox" name="the_Department" style="width:300px;">
                    <option value="0">所属部门</option>
                    <option value="1">中关村管理部</option>
                    <option value="2">昌平管理部</option>
                    <option value="3">延庆管理部</option>
                    <option value="4">门头沟管理部</option>
                    <option value="5">密云管理部</option>
                    <option value="6">怀柔管理部</option>
                    <option value="7">雍和宫管理部</option>
                    <option value="8">房山长阳管理部</option>
                    <option value="9">房山燕山管理部</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>勘察员：</th>
            <td>
                <select class="easyui-combobox" name="survey" style="width:156px;">
                    <option value="0">张三</option>
                    <option value="1">李四</option>
                    <option value="2">王麻子</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>估价员：</th>
            <td>
                <select class="easyui-combobox" name="evaluation" style="width:156px;">
                    <option value="0">王五</option>
                    <option value="1">赵六</option>
                    <option value="2">齐七</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>评估通知单出具日期：</th>
            <td><input class="easyui-textbox" name="issue_Time" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr style="text-align:center">
            <td colspan="2">
                <a href="#" class="easyui-linkbutton" iconcls="icon-add">登记</a>
                <a href="#" class="easyui-linkbutton" iconcls="icon-no" onclick="">关闭</a>
            </td>
        </tr>
    </table>
</div>
<!-- 弹出层 -->

<div style="padding:5px;background:#ccc;border:1px solid #ccc">
    <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add" onclick="$('#hover'+'treewindow').window('open')">登记</a>
    <select id="Demp" style="width:156px;">
        <option value="0">所属部门</option>
        <option value="1">中关村管理部</option>
        <option value="2">昌平管理部</option>
        <option value="3">延庆管理部</option>
        <option value="4">门头沟管理部</option>
        <option value="5">密云管理部</option>
        <option value="6">怀柔管理部</option>
        <option value="7">雍和宫管理部</option>
        <option value="8">房山长阳管理部</option>
        <option value="9">房山燕山管理部</option>
    </select>
    <a href="#" class="easyui-linkbutton" plain="true" onclick="find()" style="background:#fafafa;width:70px;height:24px;text-align:center">查询</a>
</div>

<table id="tt" class="easyui-datagrid" style="height:auto;">
    <thead>
        <tr>
            <th field="name1" width="100">项目号</th>
            <th field="name2" width="120">所属部门</th>
            <th field="name3" width="100">借款人</th>
            <th field="name4" width="120">借款人联系电话</th>
            <th field="name5" width="120">贷款额度</th>
            <th field="name6" width="135">登记日期</th>
            <th field="name7" width="120">项目状态</th>
            <th field="name8" width="80">操作</th>
        </tr>
    </thead>
    <tbody id="tbd">
        @foreach (var a in ViewBag.list)
        {
        <tr>
            <td><div style="background:#0094ff;"><p style="text-align:center;color:#fafafa;">@a.projectNumber</p></div></td>
            <td>@a.department_Name</td>
            <td>@a.loan_Name</td>
            <td>@a.loan_TEL</td>
            <td>@a.basic_Quota</td>
            <td>@a.basic_CreateTime</td>
            @if (a.basic_State == 0)
                {
                <td>未提交</td>
                }
            @if (a.basic_State == 1)
                {
                <td>待勘察</td>
                }
            @if (a.basic_State == 2)
                {
                <td>勘察进项中</td>
                }
            @if (a.basic_State == 3)
                {
                <td>待评估</td>
                }
            @if (a.basic_State == 4)
                {
                <td>评估进行中</td>
                }
            @if (a.basic_State == 5)
                {
                <td>已评估/待初审</td>
                }
            @if (a.basic_State == 6)
                {
                <td>初审未通过</td>
                }
            @if (a.basic_State == 7)
                {
                <td>初审通过</td>
                }
            @if (a.basic_State == 8)
                {
                <td>终审未通过</td>
                }
            @if (a.basic_State == 9)
                {
                <td>终审通过</td>
                }
            <td><input type="submit" value="编辑" style="background:#ff0000;color:#fafafa;"></td>
        </tr>
        }
    </tbody>
</table>
<div id="pp" class="easyui-pagination" style="background:#efefef;border:1px solid #ccc;"
     data-options="total:2000,pageSize:10">
</div>

<!--<div id="dd">Dialog Content.</div>
    <script>
        $('#dd').dialog({
            title: 'My Dialog',
            width: 600,
            height: auto,
            closed: false,
            cache: false,
            href: '/House/CapitalAdd',
            modal: true
        });
    </script>-->
<script>
    function find()
    {
        var DepartmentID = $("#Demp").val();

        if (DepartmentID == 0) {
            alert("请选择查询的部门");
        }
        else {
            location.href = "/House/CapitalList?id=" + DepartmentID;
        }
    }
</script>